Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

support for installation and interaction contexts #86

Draft
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

Chew
Copy link
Owner

@Chew Chew commented May 17, 2024

This is the most awful way of migrating guildOnly to the new installation contexts, but, it works. Accepting feedback on how this could be better!

Waiting for discord-jda/JDA#2633 to be merged before this is open for review.

@Chew Chew changed the title initial support for installation and interaction contexts support for installation and interaction contexts May 17, 2024
} else if (this.guildOnly) {
// remove bot dm from contexts
contexts.remove(InteractionContextType.BOT_DM);
} else if (!this.guildOnly) {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pretty sure a simple } else { should work here given you already check for null and if it is true. And since it's a boolean can there only be false be left by the logic.

} else if (this.guildOnly) {
// remove bot dm from contexts
contexts.remove(InteractionContextType.BOT_DM);
} else if (!this.guildOnly) {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See previous comment.

} else if (this.guildOnly) {
// remove bot dm from contexts
contexts.remove(InteractionContextType.BOT_DM);
} else if (!this.guildOnly) {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See first comment.

} else if (this.guildOnly) {
// remove bot dm from contexts
contexts.remove(InteractionContextType.BOT_DM);
} else if (!this.guildOnly) {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

blablabla first comment.

@Chew Chew marked this pull request as draft May 19, 2024 13:37
@Chew
Copy link
Owner Author

Chew commented Jun 17, 2024

Until this is deployed to JDA, this will be on a snapshot release: 2.0-SNAPSHOT-contexts which will be released soon.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants